<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * pre_system
 *
 * @author Simon Emms <simon@simonemms.com>
 */

class pre_system {
    
    
    
    public function set_environment() {
        
        /* Set session lifetime to one hour */
        ini_set('session.gc_maxlifetime', 60 * 60);
        
    }
    
    
    
    
    
    
    
    /**
     * Load Exceptions
     *
     * Simply loads the Exception class
     */
    public function load_exceptions() {
        // Due to a weird bug I have to get the absolute paths here.
        define('ABS_APPPATH', realpath(APPPATH) . '/');

        if(CI_VERSION >= '2.0') {
            // For CodeIgniter 2.0
            define('ABS_SYSDIR', realpath(SYSDIR) . '/');
            load_class('Exceptions', 'core');		
        } else {
            // For CodeIgniter 1.7.2
            define('ABS_SYSDIR', realpath(BASEPATH) . '/');
            load_class('Exceptions');
        }
    }
    
    
    
}


?>